#ifndef DEPSLIB_H
#define DEPSLIB_H

#include <time.h>

#ifdef __cplusplus
extern "C" {
#endif


struct depsStats {
  long scanned;
  long cache_used;
  long cache_updated;
};

typedef struct _depsRef *depsRef;


extern void depsStart( void );


extern void depsSetCWD( const char *cwd );


extern void depsCacheRead( const char *path );


extern void depsCacheWrite( const char *path );


extern void depsSearchStart( void );


extern void depsAddSearchDir( const char *path );


extern depsRef depsScanForHeaders( const char *path );


extern const char *depsGetNewest( depsRef ref, time_t *time );


extern void depsTimeStamp( const char *path, time_t *time );


extern void depsGetStats( struct depsStats * stats );


extern void depsDone( void );

#define DEPS_ERROR_ALREADY_INIT 1
#define DEPS_ERROR_NOT_INIT 2
#define DEPS_ERROR_NOT_SEARCH 3


extern int depsError( void );

#ifdef __cplusplus
}
#endif

#endif
